#!/bin/bash
#SBATCH -o ./logs/slurm-%j.out

set -e

if [ ! -d ./logs ]; then
    mkdir -p ./logs
fi

job_id=${SLURM_JOBID}
if [ ! -d ./checkpoints/${job_id} ]; then
    mkdir -p ./checkpoints/${job_id}
fi

# Job execution command.
srun -N 2 -n 2 -p ALL python3 ./main.py --epochs 90 --multiprocessing-distributed /home/test001/fuhao/ImageNet12/raw-data

if [ ! -d ./dist_conf ]; then
    mkdir -p ./dist_conf
fi

mv dist_url_${job_id}.txt ./dist_conf/
